from typing import Optional
from datetime import datetime
from pydantic import BaseModel

class NotificationBase(BaseModel):
    Title: str
    Content: str
    Type: str
    Priority: str
    WorkAreaId: int
    Status: str = "unread"

    class Config:
        from_attributes = True

class NotificationCreate(NotificationBase):
    pass

class Notification(NotificationBase):
    NotificationId: int
    CreateTime: datetime
    ReadTime: Optional[datetime] = None
    RecipientId: int

    class Config:
        from_attributes = True 